/*
 * @Author: Wulala
 * @Date: 2025-01-14 14:03:06
 * @LastEditTime: 2025-01-17 14:38:08
 * @LastEditors: Wulala
 * @Description: 
 * @FilePath: \zhongshelife\public\assets\js\backend\wanlshop\auth_level.js
 * 可以输入预定的版权声明、个性签名、空行等
 */
"use strict"; define(["jquery", "bootstrap", "backend", "table", "form"], function (e, t, a, i, r) {
    var n = {
        index: function () {
            i.api.init({
                extend: {
                    index_url: "wanlshop/auth_level/index" + location.search,
                    edit_url: "",
                    del_url: "wanlshop/auth_level/del",
                    multi_url: "wanlshop/auth_level/multi",
                    table: "wanlshop_auth_level"
                }
            });
            var t = e("#table"); t.bootstrapTable({
                url: e.fn.bootstrapTable.defaults.extend.index_url, pk: "id", sortName: "id", columns: [[{ checkbox: !0 },
                { field: "id", title: __("Id") },
                { field: "level_text", title: __("Level") },
                { field: "name", title: __("Name") },
                { field: "mobile", title: __("Mobile") },
                { field: "area", title: __("Area") },
                { field: "area_code", title: __("AreaCode") },
                { field: "verify", title: __("Verify"), searchList: { 2: __("Verify 2"), 3: __("Verify 3"), 4: __("Verify 4") }, formatter: i.api.formatter.status },
                {
                    field: "operate", title: __("Operate"), table: t, events: i.api.events.operate, buttons: [
                        {
                            name: "agree", title: __("通过审核"), classname: "btn btn-xs btn-success btn-magic btn-ajax", icon: "fa fa-check", text: "通过", confirm: "确认点击通过，通过审核？", url: "wanlshop/auth_level/agree", visible: function (e) { if (2 == e.verify) return !0 },
                            success: function (e, a) {
                                return t.bootstrapTable("refresh"), !1
                            },
                            error: function (e, t) {
                                return console.log(e, t), Layer.alert(t.msg), !1
                            }
                        }
                        , { name: "refuse", title: __("审核不通过"), classname: "btn btn-xs btn-danger btn-dialog", icon: "fa fa-times", text: "不通过", url: "wanlshop/auth_level/refuse", visible: function (e) { if (2 == e.verify) return !0 }, extend: 'data-area=["500px","270px"]' }
                        , { name: "detail", title: __("详情"), classname: "btn btn-xs btn-info btn-dialog", icon: "fa fa-eye", url: "wanlshop/auth_level/detail" }  
                        ,{
                            name:"opinion",
                            title:__("审核意见"),
                            classname:"btn btn-xs btn-warning btn-dialog",
                            icon:"fa fa-envira",
                            url:"wanlshop/auth_level/opinion"
                        }
                   ], formatter: i.api.formatter.operate
                }]]
            }), i.api.bindevent(t)
        }, recyclebin: function () { i.api.init({ extend: { dragsort_url: "" } }); var t = e("#table"); t.bootstrapTable({ url: "wanlshop/auth_level/recyclebin" + location.search, pk: "id", sortName: "id", columns: [[{ checkbox: !0 }, { field: "id", title: __("Id") }, { field: "name", title: __("Name"), align: "left" }, { field: "deletetime", title: __("Deletetime"), operate: "RANGE", addclass: "datetimerange", formatter: i.api.formatter.datetime }, { field: "operate", width: "130px", title: __("Operate"), table: t, events: i.api.events.operate, buttons: [{ name: "Restore", text: __("Restore"), classname: "btn btn-xs btn-info btn-ajax btn-restoreit", icon: "fa fa-rotate-left", url: "wanlshop/auth_level/restore", refresh: !0 }, { name: "Destroy", text: __("Destroy"), classname: "btn btn-xs btn-danger btn-ajax btn-destroyit", icon: "fa fa-times", url: "wanlshop/auth_level/destroy", refresh: !0 }], formatter: i.api.formatter.operate }]] }), i.api.bindevent(t) }, refuse: function () { n.api.bindevent() }, edit: function () { n.api.bindevent() }, api: { bindevent: function () { r.api.bindevent(e("form[role=form]")) } }
    }; return n
});